package com.shangting.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Schema(description = "用户权限表")
@TableName(value = "shangting_permission")
@Data
public class Permission extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "用户 ID")
    @TableField(value = "user_id")
    private Long UserId;

    @Schema(description = "api 接口")
    @TableField(value = "url")
    private String url;

    @Schema(description = "职位代码")
    @TableField(value = "post_code")
    private String postCode;

    public Permission() {
    }

    public Permission(Long userId, String url, String postCode) {
        UserId = userId;
        this.url = url;
        this.postCode = postCode;
    }

    public Long getUserId() {
        return UserId;
    }

    public void setUserId(Long userId) {
        UserId = userId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPostCode() {
        return postCode;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }

    @Override
    public String toString() {
        return "Permission{" +
                "UserId=" + UserId +
                ", url='" + url + '\'' +
                ", postCode='" + postCode + '\'' +
                '}';
    }
}